Skip to main content

Buzzer

Buzzer img

1. Write standard firmata to the device

Uploading Standard Firmata to Arduino Open Arduino IDE. File > Examples > Firmata > StandardFirmata.

Tools > Board > your board Tools > Serial Port > your port Click Upload button. if you use WSL, you need to follow this

2. Run the Buzzer

index.tsx
import { Board, Button, Buzzer. render } from "edison"
import React from "react"

const App: React.FC = () => {
return (
<Board port={'/dev/tty***'} baudRate={57600}>
<Buzzer pin={13} isOn={true} />
</Board>
)
}

render(<App />)

3. execute the program

$ npx vite-node index.tsx 

You can use <Buzzer pin={pin} isOn={boolen} />

PropsTypeDescriptionDefault
pinnumberPin number to control currentNone
isOn?boolenOn if LED is true, off if false.None